#include <iostream>
#include "Subject.cpp"
#define GRAVITY 9.8
class Physics {
    public: 
        void updateEntity(Entity& entity);

    private: 
        Subject subject_;
}

void Physics :: updateEntity(Entity& entity){
    bool wasOnSurface = entity.isOnSurface();
    entity.accelerate(GRAVITY);
    entity.update();
    if(wasOnSurface && !entity.isOnSurface()){
        notify(entity, EVENT_START_FALL);
    }
}